Skip to content

Encapsulate Insert and Delete into specific structs#1224

Merged
alamb merged 1 commit intoapache:mainfrom
tisonkun:encap-insert-delete
Apr 21, 2024
Merged

Encapsulate Insert and Delete into specific structs#1224
alamb merged 1 commit intoapache:mainfrom
tisonkun:encap-insert-delete

Conversation

@tisonkun
Copy link
Copy Markdown
Member

@tisonkun tisonkun commented Apr 15, 2024

cc @alamb

This refers to #1204 where we will pull out some of the higher level enum variants into their own Structs for easier use

Signed-off-by: tison <wander4096@gmail.com>
@alamb alamb changed the title Encapsulate Insert and Delete Encapsulate Insert and Delete into specific structs Apr 21, 2024
Comment thread src/ast/mod.rs
Comment on lines +2869 to +2870
Statement::Insert(insert) => {
let Insert {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters, but just FYI you can do the same thing in the single let statement

Suggested change
Statement::Insert(insert) => {
let Insert {
Statement::Insert(Insert {
..
}) => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comment! I'll remember this and update this snippet when I have some time. You're correct. I just follow the intuitive "refactor" :D

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 8697518764

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 36 of 40 (90.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 88.09%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 25 29 86.21%
Totals Coverage Status
Change from base Build 8660968190: 0.001%
Covered Lines: 21287
Relevant Lines: 24165

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tisonkun -- while this will require downstream changes, I think they are mechanical and will be straightforward for users and this will make it easier to manage these statements going forward.

@alamb alamb merged commit bf89b7d into apache:main Apr 21, 2024
@tisonkun tisonkun deleted the encap-insert-delete branch April 21, 2024 13:41
@tisonkun
Copy link
Copy Markdown
Member Author

Thanks for your review and merge!

JichaoS pushed a commit to luabase/sqlparser-rs that referenced this pull request May 7, 2024
Signed-off-by: tison <wander4096@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants